<template>
  <div id="kind" class="kind">
    <li @click = "toKind" :id='kind[kindid].id'>
        <img :src = "require('../assets/icon/' + kind[kindid].imgurl)">
        <p>{{kind[kindid].name}}</p>
    </li>
  </div>
</template>

<script>
export default {
  name: 'MenuKind',
  props: {
    kindid: String
  },
  data () {
    return {
    }
  },
  computed: {
    kind () {
      return this.$store.state.kinds
    }
  },
  methods: {
    toKind: function () {
      console.log(this.$store.state.kinds[this.kindid].btn)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.kind{
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.kind img{
    height: 30px;
    position: absolute;
    margin-top: 10px;
    margin-left: -35px;
}
.kind li{
    width: 80%;
    list-style: none;
    height: 50px;
    border-bottom: 2px solid rgb(211, 210, 210);
    align-self: center;
    display: inline;
    font-size: 20px;
    text-align: center;
}
.kind li:hover{
    width: 100%;
    background-color: #fff;
    border-bottom: 0;
    box-shadow: 0px 15px 15px -12px #999999;
}
.kind li p{
    display: inline;
    position: absolute;
    margin-top: 10px;
    font-weight: bold;
    color: rgb(87, 87, 87);
}
</style>
